/**
 * Copyright (c) 2010-2011 Pierre Labatut
 *
 * This file is part of Space-Chronicles project.
 *
 * Space-Chronicles is free software: you can redistribute it and/or modify it
 * under the terms of its license which may be found in the accompanying
 * LICENSE file or <http://code.google.com/p/space-chronicles/>.
 */

package space.game.splash;

import java.awt.Frame;

/**
 *
 * @author Pierre
 */
class CfgSplashDialog extends javax.swing.JDialog {

    /** Creates new form CfgSplashDialog */
    CfgSplashDialog() {
        super((Frame) null, false);
        initComponents();
        setLocationRelativeTo(null);
    }

    void setProgress(final String label, final int curStep, final int maxStep) {
        tskProgress.setValue(curStep);
        tskProgress.setMaximum(maxStep);
        tskLabel.setText(label);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        tskProgress = new javax.swing.JProgressBar();
        tskLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setUndecorated(true);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        jPanel1.setLayout(new java.awt.BorderLayout());

        tskProgress.setPreferredSize(new java.awt.Dimension(400, 19));
        tskProgress.setStringPainted(true);
        jPanel1.add(tskProgress, java.awt.BorderLayout.NORTH);

        tskLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tskLabel.setText("Loading...");
        jPanel1.add(tskLabel, java.awt.BorderLayout.SOUTH);

        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel tskLabel;
    private javax.swing.JProgressBar tskProgress;
    // End of variables declaration//GEN-END:variables
}
